
function test_clickme() {
    alert ("Clicked");
}

function test_addLink () {
    var stat = window.statusTab;
    if (stat == undefined) {
        stat = document.getElementById ("status_content");
    }

    var fuels = stat.getElementsByTagName ("span");
    var fuel = null;
    for (var i=0; i<fuels.length; i++) {
        if (fuels[i].id == "fuel") {
            fuel = fuels[i];
            break;
        }
    }
    if (fuel) {
        fuel.innerHTML += "<a href='javascript:test_clickme();void(0);'>...</a>"
    }
}

function hijackStatus () {

    var local_updateStatus = window.updateStatus;
    if (local_updateStatus != undefined) {
        window.updateStatus = function(cmd) {
            local_updateStatus(cmd);
            test_addLink ();
        }
    }
    test_addLink ();
}

hijackStatus ();